export const constantRoute = [
  {
    path: "/login",
    component: () => import("@/views/login/index.vue"),
    name: "login",
  },
  {
    path: "/",
    component: () => import("@/layout/index.vue"),
    name: "layout",
    redirect: "/home",
    children: [
      {
        path: "/home",
        component: () => import("@/views/home/index.vue"),
      },
      {
        path: "/detail/:id",
        component: () => import("@/views/detail/index.vue"),
      },
      {
        path: "/search",
        component: () => import("@/views/search/index.vue"),
      },
      {
        path: "/person",
        component: () => import("@/views/person/index.vue"),
      },
      {
        path: "/recommend",
        component: () => import("@/views/recommend/index.vue"),
      },
      {
        path: "/detail",
        component: () => import("@/views/detail/index.vue"),
      },
      {
        path: "/dishControl",
        component: () => import("@/views/dishControl/index.vue"),
      },
      {
        path: "/userControl",
        component: () => import("@/views/userControl/index.vue"),
      },
    ],
  },
  {
    path: "/404",
    component: () => import("@/views/404/index.vue"),
    name: "404",
  },
  {
    path: "/:pathMatch(.*)*",
    redirect: "/404",
    name: "Any",
  },
];
